package com.es.esjest.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author luheng
 * @create 2019/6/28
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class SearchParam {

    private String index;
    private String name;
    private String adress;
    private Integer age;
    private String birthady;
    private String interests;

    private Integer pageNo = 1;
    private Integer pageSize = 5;

    public void setPageNo(Integer pageNo) {
        if (pageNo != null && pageNo > 1) {
            this.pageNo = pageNo;
        }
    }

    public void setPageSize(Integer pageSize) {
        if (pageSize != null && pageSize > 0) {
            this.pageSize = pageSize;
        }
    }
}
